package com.ddwl.goods.mapper;

import com.ddwl.common.dao.mapper.BaseMapper;
import com.ddwl.goods.model.Activity;
import com.ddwl.schema.bo.goods.ActivityBo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

@Repository
public interface ActivityMapper extends BaseMapper<Activity, ActivityBo> {

    /**
     * 根据当前时间和商品id查询商品活动
     * @param itemId
     * @return
     */
      public  Activity findByItemIdAndCurrent(@Param("itemId")String itemId);

      void  insertById(@Param("activity")Activity activity);

      void updateById(@Param("activity")Activity activity);

      void deleteById(@Param("activityId")String activityId);

      Activity findById(@Param("id")String id);

      void updateStatus(@Param("activityId")String activityId,@Param("activityStatus")Integer activityStatus);

}
